/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 17655
 * Date: 2025-07-29
 * Time: 22:35
 */
public class test3 {
    public void rotate(int[][] matrix) {
        int n = matrix.length;
        int[][] matrix_new = new int[n][n];
        for(int i=0;i<n;i++){
            for(int j =0;j<n;j++){
                matrix_new[j][n-i-1] = matrix[i][j];
            }
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                matrix[i][j] = matrix_new[i][j];
            }
        }
    }
}
